﻿using cn.school.Models.Entities;
using cn.school.Models.Req;
using cn.school.Models.Res;

namespace cn.school.api;

public interface IStudentManage
{
    /// <summary>
    /// 向数据库内添加一条数据
    /// </summary>
    /// <param name="student">封装一定值的Student对象</param>
    /// <returns>具有ID的数据库对象</returns>
    Student AddOne(Student student);

    /// <summary>
    /// 通过ID进行精确搜索
    /// </summary>
    /// <param name="id">学生ID</param>
    /// <returns>匹配该ID的对象</returns>
    Student GetById(long id);

    /// <summary>
    /// 条件查询学生列表
    /// </summary>
    /// <param name="req">查询条件</param>
    /// <returns></returns>
    WithPage<Student> List(StudentListReq req);
}
